home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / varioref.sty < prev    next >
Text File  |  1995-11-25  |  6KB  |  169 lines

  1. %% 
  2. %% This is file `varioref.sty', generated 
  3. %% on <1993/5/1> with the docstrip utility (2.1e).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% varioref.doc  (with options: `style')
  8. %% 
  9. %% 
  10. %% Copyright (C) 1992,1993 by Frank Mittelbach. All rights reserved. 
  11. %% 
  12. %% 
  13. %% IMPORTANT NOTICE: 
  14. %% 
  15. %% You are not allowed to change this file. You may however copy this 
  16. %% file to a file with a different name and then change the copy. 
  17. %% 
  18. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  19. %% ALLOWED to take money for the distribution or use of this file (or a 
  20. %% changed version) except for a nominal charge for copying etc. 
  21. %% 
  22. %% You are allowed to distribute this file under the condition that it is 
  23. %% distributed together with all files mentioned in readme.mz7. 
  24. %% 
  25. %% If you receive only some of these files from someone, complain! 
  26. %% 
  27. %% However, if these files are distributed by established suppliers as 
  28. %% part of a complete TeX distribution, and the structure of the 
  29. %% distribution would make it difficult to distribute the whole set of 
  30. %% files, *those parties* are allowed to distribute only some of the 
  31. %% files provided that it is made clear that the user will get a complete 
  32. %% distribution-set upon request to that supplier (not me). Notice that 
  33. %% this permission is not granted to the end user. 
  34. %% 
  35. %% For error reports in case of UNCHANGED versions see readme files. 
  36. %% 
  37. %% 
  38. %% 
  39.  
  40. \def\filename{varioref}
  41. \def\fileversion{v0.1g}
  42. \def\filedate{93/02/14}
  43. \def\docdate {93/02/14}
  44.  
  45. %% \CheckSum{257}
  46. %% \CharacterTable
  47. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  48. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  49. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  50. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  51. %%   Dollar        \$     Percent       \%     Ampersand     \&
  52. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  53. %%   Asterisk      \*     Plus          \+     Comma         \,
  54. %%   Minus         \-     Point         \.     Solidus       \/
  55. %%   Colon         \:     Semicolon     \;     Less than     \<
  56. %%   Equals        \=     Greater than  \>     Question mark \?
  57. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  58. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  59. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  60. %%   Right brace   \}     Tilde         \~}
  61. %%
  62. %% Style-option varioref to use with LaTeX v2.09
  63. %% Copyright (C) 1992-1993  Frank Mittelbach, all rights reserved.
  64. \@ifundefined{c@vrcnt}{}{\endinput}
  65. \typeout{Style option: `varioref'
  66.    \fileversion\space <\filedate> (FMi)}
  67. \typeout{English documentation
  68.  \@spaces\@spaces\space<\docdate> (FMi)}
  69. \newcounter{vrcnt}
  70. \def\vpageref{\protect\p@vpageref}
  71. \def\p@vpageref{\@ifnextchar[%
  72.   \@vpageref{\@vpageref[\reftextcurrent]}%
  73. }
  74. \def\@vpageref[#1]{\@ifnextchar[%
  75.   \@@vpageref{\@@vpageref[#1][\unskip\space]}}
  76. \def\@@vpageref[#1][#2]#3{%
  77.   \leavevmode\unskip
  78.   \global\advance\c@vrcnt\@ne
  79.   \@ifundefined{r@vr@\the\c@vrcnt}%
  80.          {\@namedef{r@vr@\the\c@vrcnt}{{??}{??}}}{}%
  81.   \edef\@tempa{\expandafter\expandafter\expandafter
  82.                 \@cdr\csname r@vr@\the\c@vrcnt\endcsname
  83.                 \@nil}%
  84.   \@ifundefined{r@xvr@\the\c@vrcnt}%
  85.          {\@namedef{r@xvr@\the\c@vrcnt}{{??}{??}}}{}%
  86.   \edef\@tempb{\expandafter\expandafter\expandafter
  87.                 \@cdr\csname r@xvr@\the\c@vrcnt\endcsname
  88.                 \@nil}%
  89.   {\let\@currentlabel\@empty\label{xvr@\the\c@vrcnt}}%
  90.   \ifx\@tempa\@tempb\else
  91.   \vref@err{***^^J%
  92.             * Warning: \noexpand\vref over page boundary
  93.                        \@tempa-\@tempb\space (may loop)^^J%
  94.             ***}%
  95.   \fi
  96.   \@ifundefined{r@#3}{\@namedef{r@#3}{{??}{??}}}{}%
  97.   \edef\@tempb{\expandafter\expandafter\expandafter
  98.                 \@cdr\csname r@#3\endcsname
  99.                 \@nil}%
  100.   \space
  101.   \ifx\@tempa\@tempb
  102.     #1%
  103.   \else
  104.     #2%
  105.     \is@pos@number\@tempb
  106.        {%
  107.         \is@pos@number\@tempa
  108.          {\@tempcnta\@tempa
  109.           \advance\@tempcnta\@ne
  110.          }%
  111.          {\@tempcnta\maxdimen}%
  112.         \ifnum \@tempb =\@tempcnta
  113.          \ifodd\@tempcnta
  114.            \if@twoside
  115.              \reftextfaceafter
  116.            \else
  117.              \reftextafter
  118.            \fi
  119.          \else
  120.            \reftextafter
  121.          \fi
  122.         \else
  123.           \advance\@tempcnta-2
  124.           \ifnum \@tempb =\@tempcnta
  125.             \ifodd\@tempcnta
  126.               \reftextbefore
  127.             \else
  128.               \if@twoside
  129.                 \reftextfacebefore
  130.               \else
  131.                 \reftextbefore
  132.               \fi
  133.             \fi
  134.           \else
  135.             \reftextfaraway{#3}%
  136.           \fi
  137.         \fi
  138.        }%
  139.        {\reftextfaraway{#3}}%
  140.   \fi
  141.   {\let\@currentlabel\@empty\label{vr@\the\c@vrcnt}}%
  142. }
  143. \def\vrefwarning{\let\vref@err\typeout}
  144. \let\vref@err\errmessage
  145. \def\vref{\protect\p@vref}
  146. \def\p@vref#1{%
  147.   \unskip~\ref{#1}%
  148.   \@vpageref[\unskip]{#1}%
  149. }
  150. \def\is@pos@number#1{\is@pos@num0#1\space\@nil}
  151. \def\is@pos@num{\afterassignment\is@pos@num@ \count@}
  152. \def\is@pos@num@#1\@nil{%
  153.   \if0#10%
  154.     \expandafter\@firstarg \else
  155.     \expandafter\@secondarg  \fi}
  156. \def\@firstarg#1#2{#1}
  157. \def\@secondarg#1#2{#2}
  158. \def\reftextvario#1#2{\ifodd\c@vrcnt #1\else#2\fi}
  159. \def\reftextfaceafter {on the \reftextvario{facing}{next} page}
  160. \def\reftextfacebefore{on the \reftextvario{facing}{preceding} page}
  161. \def\reftextafter     {on the \reftextvario{following}{next} page}
  162. \def\reftextbefore    {on the \reftextvario{preceding page}{page before}}
  163. \def\reftextcurrent   {on \reftextvario{this}{the current} page}
  164. \def\reftextfaraway#1{on page~\pageref{#1}}
  165. \def\fullref#1{\ref{#1} on page~\pageref{#1}}
  166. \endinput
  167. %% 
  168. %% End of file `varioref.sty'.
  169.